#省略链接数据库以及查询数据步骤
from pyecharts.charts import Bar
from pyecharts import options
sal = [7000,5300,3000,6666,5500,8000]
city = ["北京","南昌","九江","上海","成都","深圳"]
bar=Bar()

bar.add_xaxis(city)

bar.add_yaxis("月薪/元",sal)
bar.set_global_opts(title_opts=options.TitleOpts(title="各城市的平均薪水图",subtitle="单位/元"))
bar.render("baravg.html")
